<?
set_time_limit(1000);

require_once("../config/dbconn.php");require_once("../config/powercls.php");

$sql="select * from {$db_prefix}users where 1 order by id asc";
$result=$db->query($sql);
if ($db->num_rows($result)==0) die("ok了");
while($rs=$db->fetch_array($result)){
	if($rs['gluser']){
		$sql2="select * from {$db_prefix}users where username='".$rs['gluser']."'";
		$rs2=$db->get_one($sql2);
		if ($rs2['glstr']) $glstr=$rs2['glstr'].','.$rs2['id'];else $glstr=$rs2['id'];
		$sqlgx="update {$db_prefix}users set glstr='$glstr' where id='".$rs['id']."'";
		$db->query($sqlgx);
	}
}
$db->free_result($result);
echo "ok";
exit();
?>